﻿using NUnit.Framework;
using PoliticalClassifier.Support;

namespace PoliticalClassifier.DataSource.Tests
{
    [TestFixture]
    public class DataSourceConnectionTest
    {
        [Test]
        public void TestOpenClose()
        {
            IDataSourceConnection dataSource = new DataSourceConnection();
            IDataSourceLoadResults loadResults = new DataSourceLoadResults();
            dataSource.Open(@"..\..\TestFiles\Social_Economic_DataMicro.xlsx", loadResults);
            
            Assert.IsNotNull(dataSource.DataSet, "DataSet is null after Open()");
            dataSource.Close();
            Assert.IsNull(dataSource.DataSet, "DataSet is not null after Close()");
        }
    }
}
